//
//  YHJHudView.m
//  Youhuiju
//
//  Created by yutenys on 16/7/13.
//  Copyright © 2016年 yutenys. All rights reserved.
//

#import "YHJHudView.h"
#import <MBProgressHUD/MBProgressHUD.h>
@implementation YHJHudView
+(void)showMessage:(NSString *)message delay:(NSTimeInterval)timeInterval
{
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:[UIApplication sharedApplication].keyWindow animated:YES];
    hud.labelText = message;
    [hud hide:YES afterDelay:timeInterval];
}

//
+(void)showMessage:(NSString *)message withButtonTitles:(NSArray<__kindof NSString *> *)titles
{
    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:message delegate:self cancelButtonTitle:nil otherButtonTitles:titles[0], nil];
    
    if (titles.count == 2) {
        [alertView addButtonWithTitle:titles[1]];
    }
    
    [alertView show];
    
}

@end
